package pl.edu.uj.tcs.blef.server;

import java.net.Socket;

public final class Client {
	private Socket socket;
	private String nick;
	private int initialHandSize;
	
	public Client(String nick, Socket socket, int initialHandSize){
		this.nick = nick;
		this.socket = socket;
		this.initialHandSize = initialHandSize;
	}
	
	public Socket getSocket(){
		return this.socket;
	}
	
	public String getNick(){
		return this.nick;
	}
	
	public int getInitialHandSize(){
		return this.initialHandSize;
	}
	
	@Override
	public boolean equals(Object o){
		if(o == null) return false;
		if(!(o instanceof Client)) return false;
		Client c = (Client)o;
		return this.nick.equals(c.nick);
	}
	
	@Override
	public int hashCode(){
		return this.nick.hashCode();
	}
}
